+Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.h:
+ * gtk/gtktypeutils.c: added gtk_type_query() which returns a newly
+ allocated structure holding certain type specific informations.
+ fixed the big bunch of `discards const' warnings with the
+ initialization of enum/flags values.
+
Tue Dec 8 15:10:17 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_transient_parent_realized):
+Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.h:
+ * gtk/gtktypeutils.c: added gtk_type_query() which returns a newly
+ allocated structure holding certain type specific informations.
+ fixed the big bunch of `discards const' warnings with the
+ initialization of enum/flags values.
+
Tue Dec 8 15:10:17 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_transient_parent_realized):
+Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.h:
+ * gtk/gtktypeutils.c: added gtk_type_query() which returns a newly
+ allocated structure holding certain type specific informations.
+ fixed the big bunch of `discards const' warnings with the
+ initialization of enum/flags values.
+
Tue Dec 8 15:10:17 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_transient_parent_realized):
+Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.h:
+ * gtk/gtktypeutils.c: added gtk_type_query() which returns a newly
+ allocated structure holding certain type specific informations.
+ fixed the big bunch of `discards const' warnings with the
+ initialization of enum/flags values.
+
Tue Dec 8 15:10:17 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_transient_parent_realized):
+Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.h:
+ * gtk/gtktypeutils.c: added gtk_type_query() which returns a newly
+ allocated structure holding certain type specific informations.
+ fixed the big bunch of `discards const' warnings with the
+ initialization of enum/flags values.
+
Tue Dec 8 15:10:17 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_transient_parent_realized):
+Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.h:
+ * gtk/gtktypeutils.c: added gtk_type_query() which returns a newly
+ allocated structure holding certain type specific informations.
+ fixed the big bunch of `discards const' warnings with the
+ initialization of enum/flags values.
+
Tue Dec 8 15:10:17 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_transient_parent_realized):
+Wed Dec 9 00:49:12 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.h:
+ * gtk/gtktypeutils.c: added gtk_type_query() which returns a newly
+ allocated structure holding certain type specific informations.
+ fixed the big bunch of `discards const' warnings with the
+ initialization of enum/flags values.
+
Tue Dec 8 15:10:17 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_transient_parent_realized):
GtkSignalDestroy destroy_func);
/* Report internal information about a signal. The caller has the
- * responsibility to invoke a supsequent g_free (returned_data); but
- * must not modify data pointed to by the members of GtkSignalQuery
+ * responsibility to invoke a subsequent g_free (returned_data); but
+ * must not modify data pointed to by the members of GtkSignalQuery
*/
GtkSignalQuery* gtk_signal_query (guint signal_id);
}
static inline GtkType
-gtk_type_register_intern (gchar *name,
- GtkType parent,
- GtkEnumValue *values)
+gtk_type_register_intern (gchar *name,
+ GtkType parent,
+ const GtkEnumValue *values)
{
GtkType type_id;
GtkTypeInfo info;
info.class_size = 0;
info.class_init_func = NULL;
info.object_init_func = NULL;
- info.reserved_1 = values;
+ info.reserved_1 = (gpointer) values;
info.reserved_2 = NULL;
/* relookup pointers afterwards.
return type_id;
}
+GtkTypeQuery*
+gtk_type_query (GtkType type)
+{
+ GtkTypeNode *node;
+
+ LOOKUP_TYPE_NODE (node, type);
+ if (node)
+ {
+ GtkTypeQuery *query;
+
+ query = g_new0 (GtkTypeQuery, 1);
+ query->type = type;
+ query->type_name = node->type_info.type_name;
+ query->object_size = node->type_info.object_size;
+ query->class_size = node->type_info.class_size;
+ }
+
+ return NULL;
+}
+
static guint
gtk_type_name_hash (const char *key)
{
gchar *type_name;
GtkType *type_id;
GtkType parent;
- GtkEnumValue *values;
+ const GtkEnumValue *values;
} builtin_info[GTK_TYPE_NUM_BUILTINS + 1] = {
#include "gtktypebuiltins_ids.c" /* type entries */
{ NULL }
typedef struct _GtkArg GtkArg;
typedef struct _GtkObject GtkObject; /* forward declaration of object type */
typedef struct _GtkTypeInfo GtkTypeInfo;
+typedef struct _GtkTypeQuery GtkTypeQuery;
typedef struct _GtkEnumValue GtkEnumValue;
typedef struct _GtkEnumValue GtkFlagValue;
GtkClassInitFunc base_class_init_func;
};
+struct _GtkTypeQuery
+{
+ GtkType type;
+ const gchar *type_name;
+ guint object_size;
+ guint class_size;
+};
+
struct _GtkEnumValue
{
guint value;
void gtk_type_set_varargs_type (GtkType foreign_type,
GtkType varargs_type);
GtkType gtk_type_get_varargs_type (GtkType foreign_type);
+/* Report internal information about a type. The caller has the
+ * responsibility to invoke a subsequent g_free (returned_data); but
+ * must not modify data pointed to by the members of GtkTypeQuery
+ */
+GtkTypeQuery* gtk_type_query (GtkType type);